<%--
  Created by IntelliJ IDEA.
  User: qintao30057
  Date: 2018/1/26
  Time: 9:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>按钮权限</title>
    <%@ include file="../../../common/meta.jsp" %>
    <link href="${ctx}/css/page/common-win.css?t=${now}" rel="stylesheet">
    <style>
        #_btnDiv{
            height: 34px;
            margin-bottom: 0px;
        }
        .fixed-table-header, .fixed-table-footer{
            display: none!important;
        }
    </style>
    <script>
        var searchInfo = ${searchInfo};
    </script>
</head>
<body class="gray-bg">
<div>
    <div class="myContent">
        <div class="tabs-container">
            <div class="tab-content">
                <div id="tab-1" class="tab-pane active">
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="ibox float-e-margins myIbox">
                                <div class="ibox-content">
                                    <h5 class="page-header page-header-new"><i class="fa fa-file-text"></i>&nbsp;&nbsp;按钮权限分配</h5>
                                    <table  data-toggle="table">
                                        <tr>
                                            <th style="width: 160px; border: 1px solid #e4eaec;">一级菜单</th>
                                            <th style="width: 160px; border: 1px solid #e4eaec;">二级菜单</th>
                                            <th style="width: 160px; border: 1px solid #e4eaec;">TAB页</th>
                                            <th style="border: 1px solid #e4eaec;">按钮</th>
                                        </tr>
                                        <c:forEach items="${dataListMap}" var="item1" varStatus="status">
                                            <tr>
                                                <c:if test="${not empty item1 && item1.isMainMenuP == 'Y'}">
                                                    <td rowspan="${not empty item1 ? item1.pMenuRowspan : 1}">
                                                            ${not empty item1 ? item1.pMenuName : ''}
                                                    </td>
                                                </c:if>
                                                <c:if test="${not empty item1 && item1.isMainMenuC == 'Y'}">
                                                    <td rowspan="${not empty item1 ? item1.cMenuRowspan : 1}">
                                                        <label>
                                                            <input type="checkbox" id="tabAllCheckBox${item1.cMenuId}" onclick="checkboxOnclick(this,${item1.cMenuId})"
                                                                <c:if test="${not empty item1.isChecked && item1.isChecked == 'Y'}">
                                                                    checked="checked"
                                                                </c:if>
                                                                <%--<c:forEach items="${item1.btnList}" var="item3">
                                                                    <c:forEach items="${selectedBtnIdListMap}" var="item32">
                                                                        <c:if test="${item3.btnId == item32}">
                                                                            checked="checked"
                                                                        </c:if>
                                                                    </c:forEach>
                                                                </c:forEach>--%>
                                                            />
                                                            ${not empty item1 ? item1.cMenuName : ''}
                                                        </label>
                                                    </td>
                                                </c:if>
                                                <td>${not empty item1.tabName ? item1.tabName : ''}</td>
                                                <td>
                                                    <c:if test="${not empty item1.btnList}">
                                                        <c:forEach items="${item1.btnList}" var="item2">
                                                                <input type="checkbox" name="_btn" menuId="${item2.menuId}" id="${item2.btnId}" value="${item2.btnId}"
                                                                       onclick="checkAllBox(${item2.menuId})"
                                                                <c:if test="${not empty item2.isChecked && item2.isChecked == 'Y'}">
                                                                       checked="checked"
                                                                </c:if>
                                                                <%--<c:forEach items="${selectedBtnIdListMap}" var="item22">
                                                                    <c:if test="${item2.btnId == item22}">
                                                                    checked="checked"
                                                                    </c:if>
                                                                </c:forEach> >--%>
                                                                />
                                                                ${item2.btnName}
                                                            </label>
                                                        </c:forEach>
                                                    </c:if>
                                                </td>
                                            </tr>
                                        </c:forEach>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <div class="form-group" id="_btnDiv">
                    <div class="col-sm-4 col-sm-offset-5">
                        <input type="button" class="btn btn-primary" onclick="doSave()" value="保存">
                        <input type="button" class="btn btn-white" onclick="doClose()" value="返回">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctx}/js/sys/role/win/setBtnMgr.js?t=${now}"></script>
</body>
</html>
